<html>
	<head>
		<meta charset="utf-8"></meta>
		<title>BViewer</title>
		<link href="./style.css" rel="stylesheet" type="text/css"/>
	</head>
	<body>
		<div class="class" name="BViewer">
			<h1>BViewer</h1>
			<p>继承自<a href="BWidget.html">BWidget</a></p>
			<p id="resume"><a href="#desc">详细</a></p>
			<h2>public</h2>
			<table id="public">
				<tr><td align="right"></td><td><a href="#BViewer(BWidget*)">BViewer</a>(BWidget* parent = 0);</td></tr>
				<tr><td align="right"></td><td><a href="#BViewer(const BString&,BWidget*)">BViewer</a>(const BString& title, BWidget* parent = 0);</td></tr>
				<tr><td align="right"></td><td><a href="#~BViewer()">~BViewer</a>();</td></tr>
				<tr><td align="right">void </td><td><a href="#setScene(BScene*)">setScene</a>(BScene* scene);</td></tr>
				<tr><td align="right">BScene* </td><td><a href="#scene()">scene</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setCamera(BCamera*)">setCamera</a>(BCamera* camera);</td></tr>
				<tr><td align="right">BCamera* </td><td><a href="#camera()">camera</a>();</td></tr>
				<tr><td align="right">const BCamera* </td><td><a href="#camera()">camera</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setHandler(BHandler*)">setHandler</a>(BHandler* handler);</td></tr>
				<tr><td align="right">BHandler* </td><td><a href="#handler()">handler</a>();</td></tr>
				<tr><td align="right">const BHandler* </td><td><a href="#handler()">handler</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setPicker(BPicker*)">setPicker</a>(BPicker* picker);</td></tr>
				<tr><td align="right">BPicker* </td><td><a href="#picker()">picker</a>();</td></tr>
				<tr><td align="right">const BPicker* </td><td><a href="#picker()">picker</a>() const;</td></tr>
				<tr><td align="right">BReal </td><td><a href="#unit(BReal)">unit</a>(BReal dist) const;</td></tr>
				<tr><td align="right">BReal </td><td><a href="#unit(const BVector&)">unit</a>(const BVector& point) const;</td></tr>
				<tr><td align="right">BVector </td><td><a href="#vertex(int, int, BReal)">vertex</a>(int x, int y, BReal d) const;</td></tr>
				<tr><td align="right">BLine </td><td><a href="#line(int, int)">line</a>(int x, int y) const;</td></tr>
				<tr><td align="right">BVector </td><td><a href="#vertex(const BPoint&, BReal)">vertex</a>(const BPoint& point, BReal d) const;</td></tr>
				<tr><td align="right">BLine </td><td><a href="#line(const BPoint&)">line</a>(const BPoint& point) const;</td></tr>
				<tr><td align="right">BPoint </td><td><a href="#point(const BVector)">point</a>(const BVector vector);</td></tr>
				<tr><td align="right">BPickHit* </td><td><a href="#pick(int, int)">pick</a>(int x, int y) const;</td></tr>
				<tr><td align="right">BPickHit* </td><td><a href="#pick(const BPoint&)">pick</a>(const BPoint& point) const;</td></tr>
				<tr><td align="right">virtual BSize </td><td><a href="#sizeHint()">sizeHint</a>() const;</td></tr>
			</table>
			<h2>protected</h2>
			<table id="protected">
				<tr><td align="right">virtual void </td><td><a href="#event(const BEvent&)">event</a>(const BEvent& event);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#paintEvent(const BEvent&)">paintEvent</a>(const BEvent& event);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#mouseWheelEvent(const BMouseEvent&)">mouseWheelEvent</a>(const BMouseEvent& mouseEvent);</td></tr>
			</table>
			<div id="desc">
				<h2>详细介绍：</h2>
				<p>BViewer是场景视图控件，其可包含一个场景对象，一个摄像机和一个操作器。它展示摄像机对场景的取景图像到中心区。如果有操作器，那么会将各种事件传递给操作器，使其对摄像机进行操作。</p>
				<p>BViewer默认会内置一个拾取器（BPicker）对场景中的东西进行拾取，也可以更换拾取器。</p>
			</div>
			<h2 id="docs">成员文档：</h2>
			<div id="BViewer(BWidget*)">
				<h3>BViewer(BWidget* parent = 0);</h3>
				<p>Constructs a viewer.</p>
			</div>
			<div id="BViewer(const BString&,BWidget*)">
				<h3>BViewer(const BString&amp; title, BWidget* parent = 0);</h3>
			</div>
			<div id="~BViewer()">
				<h3>~BViewer();</h3>
				<p>Destroys a viewer.</p>
			</div>
			<div id="setScene(BScene*)">
				<h3>void setScene(BScene* scene);</h3>
				<p>Attachs a scene to this viewer, if you want it shows, you should attach a camera for this viewer, the camera does't have to be in the scene.</p>
			</div>
			<div id="scene()">
				<h3>BScene* scene() const;</h3>
				<p>Returns the scene attached of this viewer.</p>
			</div>
			<div id="setCamera(BCamera*)">
				<h3>void setCamera(BCamera* camera);</h3>
				<p>Attachs a camera to this viewer, make you the camera has right paraments.</p>
			</div>
			<div id="camera()">
				<h3>BCamera* camera();</h3>
				<p>Get the camera attached of this viewer.</p>
			</div>
			<div id="camera()">
				<h3>const BCamera* camera() const;</h3>
			</div>
			<div id="setHandler(BHandler*)">
				<h3>void setHandler(BHandler* handler);</h3>
				<p>Attachs a handler to this viewer, which will catch viewer's event to control the camera.</p>
			</div>
			<div id="handler()">
				<h3>BHandler* handler();</h3>
				<p>Get the handler attached of this viewer.</p>
			</div>
			<div id="handler()">
				<h3>const BHandler* handler() const;</h3>
			</div>
			<div id="setPicker(BPicker*)">
				<h3>void setPicker(BPicker* picker);</h3>
			</div>
			<div id="picker()">
				<h3>BPicker* picker();</h3>
			</div>
			<div id="picker()">
				<h3>const BPicker* picker() const;</h3>
			</div>
			<div id="unit(BReal)">
				<h3>BReal unit(BReal dist) const;</h3>
			</div>
			<div id="unit(const BVector&)">
				<h3>BReal unit(const BVector&amp; point) const;</h3>
				<p>Get size per pixel at the point.</p>
			</div>
			<div id="vertex(int, int, BReal)">
				<h3>BVector vertex(int x, int y, BReal d) const;</h3>
			</div>
			<div id="line(int, int)">
				<h3>BLine line(int x, int y) const;</h3>
				<p>Get a line at viewer pos(x, y), the line begins from camera near face ends to far face.</p>
			</div>
			<div id="vertex(const BPoint&, BReal)">
				<h3>BVector vertex(const BPoint&amp; point, BReal d) const;</h3>
			</div>
			<div id="line(const BPoint&)">
				<h3>BLine line(const BPoint&amp; point) const;</h3>
				<p>Get a line at viewer point.</p>
			</div>
			<div id="point(const BVector)">
				<h3>BPoint point(const BVector vector);</h3>
			</div>
			<div id="pick(int, int)">
				<h3>BPickHit* pick(int x, int y) const;</h3>
				<p>Try to pick a item of scene by the line at viewer pos(x, y);</p>
			</div>
			<div id="pick(const BPoint&)">
				<h3>BPickHit* pick(const BPoint&amp; point) const;</h3>
				<p>Try to pick a item of scene by the line at viewer point.</p>
			</div>
			<div id="sizeHint()">
				<h3>virtual BSize sizeHint() const;</h3>
			</div>
			<div id="event(const BEvent&)">
				<h3>virtual void event(const BEvent&amp; event);</h3>
				<p>Handler will catch all event here. When event type is Event_Update if the camera is dirty this viewer will be fresed. When event type is Event_Resize the camera's pixel size will be ajusted to size of client size.</p>
			</div>
			<div id="paintEvent(const BEvent&)">
				<h3>virtual void paintEvent(const BEvent&amp; event);</h3>
				<p>If the camera is dirty it's frame will be rendered and painted to client rect.</p>
			</div>
			<div id="mouseWheelEvent(const BMouseEvent&)">
				<h3>virtual void mouseWheelEvent(const BMouseEvent&amp; mouseEvent);</h3>
			</div>
		</div>
	</body>
</html>